{extend name="public/base" /}
{block name="title"}商城首页{/block}
{block name="css"}
<style type="text/css">
body{background: #f8f8f8 !important;}
.oneslide{width: 93%!important;left: 3%!important;}
.all-goods-btn{font-size: 0;}
.all-goods-btn button{width:calc(100% - 2rem);margin:0 1rem;background:linear-gradient(129deg, rgba(252, 118, 19, 1), rgba(255, 168, 76, 1));color: #fff;height: .8rem;line-height: .8rem;border-radius: .5rem;outline: none;border:none;font-size: .28rem;font-weight: bold;margin-top: .2rem}
</style>
{/block}
{block name="content"}
<div id="app">
    <div class="home-top-search-box">
        <div class="search-box">
            <img src="/static/mod/shop/images/search.png " alt=" ">
            <span>搜索商品</span>
        </div>
    </div>
    <div class="home-swiper-box">
        {if count($banner) == 1}
        <div id="slide" class="slide" class="index-slide">
            {if $banner[0]['landing_url']}
            <div class="img oneslide"><a href="{$banner[0]['landing_url']}"><img src="__FILEROOT__{$banner[0]['img']}" /></a></div>
            {else/}
            <div class="img oneslide"><img src="__FILEROOT__{$banner[0]['img']}" /></div>
            {/if}
        </div>
        {else /}
        <div id="slide" class="slide" class="index-slide">
            {volist name="$banner" id="vo"}
            {if $vo.landing_url}
            <div class="img"><a href="{$vo.landing_url}"><img src="__FILEROOT__{$vo.img}" /></a></div>
            {else/}
            <div class="img"><img src="__FILEROOT__{$vo.img}" /></div>
            {/if}
            {/volist}
            <div class="slide-bt"></div>
        </div>
        {/if}
    </div>
    <div class="home-content">
        <!-- <div class="all-goods-btn">
            <button onclick="javascript:window.location.href='{:route(\'search\')}';">全部商品</button>
        </div> -->
        <div class="home-content-xianshi">
        	<!-- 抢购 -->
            {if $flashSale}
            <div class="home-content-xianshi-title">
                <img src="__MOD__/shop/images/xianshi.png" alt="" class="home-content-xianshi-title-left">
                <!-- <div class="home-content-xianshi-title-right">
                    <img src="__MOD__/shop/images/jishi.png" alt="">
                    <span class="fs10 mr10">倒计时</span>
                    <span class="item fs10" id="shi">00</span>
                    <span class="maohao fs10">:</span>
                    <span class="item fs10" id="fen">00</span>
                    <span class="maohao fs10">:</span>
                    <span class="item fs10" id="miao">00</span>
                </div> -->
            </div>
            <div class="home-content-xianshi-content fs0">
                {volist name="$flashSale" id="vo"}
                <div class="home-content-xianshi-content-item">
                    <a href="{:route('shop/Goods/detail', ['id' => $vo.goods_id])}">
                    <img src="__FILEROOT__/thumb{$vo.sku_img}" alt="">
                    <div class="fs12 cl33 over title">{$vo.goods_name}</div>
                    <div class="fs0 price"><span class="fs10 clog">￥<span class="fs12 fwb">{$vo.price}</span></span> <del class="clad fs10 ml5">￥<del>{$vo.market_price}</del></del>
                    </div>
                    </a>
                </div>
                {/volist}
            </div>
            {/if}
            <!--今日推荐  -->
            {foreach $reco as $k=>$vo}
            <div class="home-content-tuijian-title ">
                {$k}
            </div>
            <div class="home-content-tuijian-content fs0">
                {volist name="$vo" id="vv"}
                <div class="home-content-xianshi-content-item">
                <a href="{:route('shop/Goods/detail', ['id' => $vv.goods_id])}">
                    <img src="__FILEROOT__/thumb{$vv.sku_img}" alt="">
                    <div class="fs12 cl33 over title">{$vv.goods_name}</div>
                    <div class="fs0 price"><span class="fs10 clog">￥<span class="fs12 fwb">{$vv.price}</span></span> <del class="clad fs10 ml5">￥<del>{$vv.market_price}</del></del>
                    </div>
                </a>
                </div>
                {/volist}
            </div>
            {/foreach}
        </div>
    </div>

</div>
{include file="public/menu" /}
{/block}
{block name="footjs"}
<script type="text/javascript" src="__MOD__/shop/js/slide.js"></script>
<!-- <script type="text/javascript" src="__MOD__/shop/js/time.js"></script> -->
<script type="text/javascript">
    $('.search-box').on('click', function(){
        window.location.href = '{:route(\'Index/classify\')}?from=index';
    })
</script>
{/block}